#!/bin/sh 

PTYPES="boolean Boolean Boolean 1 z #\
        byte Byte Byte 1 b #\
        char Character Char 2 c #\
        short Short Short 2 s #\
        int Integer Int 4 i #\
        float Float Float 4 f #\
        long Long Long 8 j #\
        string String String x x #\
        date Date Date x x #\
        bigint BigInteger BigInteger x x #\
        double Double Double 8 d "

echo "${PTYPES}" | tr '#' '\n' | while read xxx XXX Xxx SSS x; do
    id='Id'
    cat > "${XXX}"FieldModel.java << xxEOFxx

/*
 * Copyright (C) 2009 Archie L. Cobbs. All rights reserved.
 *
 * \$${id}\$
 */

package org.dellroad.sidekar.schema.model;

/**
 * ${XXX} schema type.
 */
public class ${XXX}FieldModel extends AtomicFieldModel {

    public static final String NAME = "${xxx}";

    public ${XXX}FieldModel() {
        super(NAME);
    }

    @Override
    public <R> R visit(FieldModelSwitch<R> sw) {
        return sw.case${XXX}FieldModel(this);
    }
}

xxEOFxx

done
